<template>
  <div>
    <el-tabs
      tab-position="left"
      style="height: 1050px"
      v-model="activeName"
      @tab-click="handleClick"
    >
      <el-tab-pane name="1">
        <span slot="label"><i class="el-icon-ali-qingganfenxi"></i> 情感</span>
        <EvaluationCardList :evaluationType="1"></EvaluationCardList>
      </el-tab-pane>
      <el-tab-pane name="2">
        <span slot="label"
          ><i class="el-icon-ali-zhiyexinggeceping"></i> 性格</span
        >
        <EvaluationCardList :evaluationType="2"></EvaluationCardList>
      </el-tab-pane>
      <el-tab-pane name="3">
        <span slot="label">
          <i class="el-icon-ali-jiankangdanganx"></i> 健康</span
        >
        <EvaluationCardList :evaluationType="3"></EvaluationCardList>
      </el-tab-pane>
      <el-tab-pane name="4">
        <span slot="label"><i class="el-icon-ali-ziyuan23"></i> 职场</span>
        <EvaluationCardList :evaluationType="4"></EvaluationCardList>
      </el-tab-pane>
      <el-tab-pane name="5">
        <span slot="label"><i class="el-icon-ali-renji"></i> 人际</span>
        <EvaluationCardList :evaluationType="5"></EvaluationCardList>
      </el-tab-pane>
      <el-tab-pane name="6">
        <span slot="label"> <i class="el-icon-ali-nengli"></i> 能力</span>
        <EvaluationCardList :evaluationType="6"></EvaluationCardList>
      </el-tab-pane>
    </el-tabs>
  </div>
</template>

<script>
import EvaluationCardList from "@/components/evaluation/EvaluationCardList.vue";
export default {
  components: { EvaluationCardList },
  created() {
    let name = localStorage.getItem("evaTabName");
    if (name) {
      this.activeName = name;
    }
  },
  data() {
    return {
      activeName: "1",
    };
  },
  methods: {
    handleClick(tab, event) {
      localStorage.setItem("evaTabName", tab.name);
    },
  },
};
</script>

<style scoped>
</style>